/*
 * @Description: 
 * @version: 
 * @Author: wyx
 * @Date: 2020-09-28 20:36:56
 * @LastEditDate: Do not exit
 */
import request from '@/utils/request'

/**
 *查询所有
 * @param {*}keyword
 */
export function getGoodsPage(keyword){
    return request({url:"/goods-service/goods/listpage",method:"post",data:keyword});
}

/**
 * 添加商品
 * @param {type} 
 */
export function insert(goods){
    return request({url:"/goods-service/goods",method:"post",data:goods});
}

/**
 * 修改商品
 * @param {type} 
 */
export function update(goods){
    return request({url:"/goods-service/goods",method:"put",data:goods});
}


/**
 * 根据商品id删除
 * @param {type} 
 */
export function removeById(id){
    return request({url:"/goods-service/goods/"+id,method:"delete"});
}

/**
 * 删除上传图片
 * @param {type} 
 */
export function removePath(path){
    return request({url:"/goods-service/goods/file/"+path,method:"delete"});
}
